home *** CD-ROM | disk | FTP | other *** search
/ Amiga Collections: Camelot / Camelot 098 (1990-12)(Swedish User Group of Amiga)(SE)(PD)[WB].zip / Camelot 098 (1990-12)(Swedish User Group of Amiga)(SE)(PD)[WB].adf / XLisp-Stat / Book / lik-gamma.lsp < prev    next >
Text File  |  1990-10-11  |  285b  |  14 lines

  1. ; book p.108
  2.  
  3. (require "functions/newton.lsp")
  4.  
  5. (def x (gamma-rand 30 4.5))
  6.  
  7. (def f (let ((s (sum (log x)))
  8.              (n (length x)))
  9.          #'(lambda (a)
  10.              (- (* (- a 1) s) (* n (log-gamma a))))))
  11.  
  12. (def df (make-derivative f .001))
  13. (def ddf (make-derivative df .001))
  14.